//
// Created by Administrator on 25-6-30.
//

#ifndef ZXB_H
#define ZXB_H
#include "main.h"
#include <math.h>
#define _R (3.1415926/180)
#define R2R(X) (_R * X)
#define _D(X) ((double)(X))
#define SINF(A, F, f, x) (A * sin(F + f * R2R(x)))
uint16_t __ZXB[24] = {0, 341, 682, 1023, 1364, 1705, 2046, 2387, 2728, 3096, 3410, 3751, 4092, 3751, 3410, 3096, 2728, 2387, 2046, 1705, 1364, 682, 341, 0};
uint16_t BX[2563];
void make_SIN(double A, double f, double F) {
    for(int i = 0; i < 2563; i++) {
        BX[i] = 4096 * (SINF(A, F, f, 360 * ((double)i/2563)) + 1) / 2;
    }
}
#endif //ZXB_H
